package com.healthy.mapper;
import com.healthy.entity.Customerprofile;
import org.apache.ibatis.annotations.*;
import java.util.List;

public interface CustomerprofileMapper {
    //    查询所有
    @Select("select * from t_customerprofile")
    List<Customerprofile> culist();

    //    添加
    @Insert("insert into t_customerprofile (name, sex, phone,doctor) values ( #{customerprofile.name}, #{customerprofile.sex}, #{customerprofile.phone}, #{customerprofile.doctor})")
    int cuInsert(@Param("customerprofile") Customerprofile customerprofile);

    //删除
    @Delete("delete from t_customerprofile where id = #{id}")
    int cuDeleteByid(int id);

    //修改
    @Update("update t_customerprofile set name = #{name}, sex = #{sex}, phone = #{phone}, doctor = #{doctor} where id = #{id}")
    int cuUpdateByid(@Param("id") int id,@Param("name") String name,@Param("sex") String sex,@Param("phone") String phone,@Param("doctor") String doctor);
}

